script/execute: Limit the recursion depth
authorB Horn <b@horn.uk>
Thu, 18 Apr 2024 18:04:13 +0000 (19:04 +0100)
committerMiao Wang <shankerwangmiao@gmail.com>
Sun, 15 Feb 2026 13:50:20 +0000 (13:50 +0000)
commit6be1bcfb1b7160fb51c9b3efe18427f1d456d967
tree686c0f18316c7d1b65e88fdc1ab916a34bf65665
parent6a18979d4662ffd705de01436491697477e1a814
script/execute: Limit the recursion depth

If unbounded recursion is allowed it becomes possible to collide the
stack with the heap. As UEFI firmware often lacks guard pages this
becomes an exploitable issue as it is possible in some cases to do
a controlled overwrite of a section of this heap region with
arbitrary data.

Reported-by: B Horn <b@horn.uk>
Signed-off-by: B Horn <b@horn.uk>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Gbp-Pq: Topic cve-2025-jan
Gbp-Pq: Name script-execute-Limit-the-recursion-depth.patch
grub-core/script/execute.c